package com.essroid.study.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DatabaseHelper extends SQLiteOpenHelper {

	private static final String DBNAME = "EasyAndroid.db";
	private static final int DBVERSION = 1;

	private String CREATE_SQL;

	public DatabaseHelper(Context context) {
		super(context, DBNAME, null, DBVERSION);

		CREATE_SQL = "CREATE TABLE EasyAndroid(";
		CREATE_SQL += "_id  INTEGER PRIMARY KEY AUTOINCREMENT,";
		CREATE_SQL += "Date  TEXT NOT NULL,";
		CREATE_SQL += "Subject  TEXT NOT NULL);";

	}

	@Override
	public void onCreate(SQLiteDatabase sqlitedatabase) {
		sqlitedatabase.execSQL(CREATE_SQL);
	}

	@Override
	public void onUpgrade(SQLiteDatabase sqlitedatabase, int i, int j) {

	}

}
